<template>
  <div class="CommonPro">
    <!-- 顶部页面标题栏 -->
    <!-- <div class="header">
      <div class="backIcon" @click="back">
        <img slot="icon" src="../../assets/transfer/backIcon.png" class="iconImage" />
      </div>
      <div class="theme">常见问题</div>
    </div>-->

    <!-- 页面主体信息区域 -->
    <div class="outermostMargin">
      <van-cell-group v-for="item in proList" :key="item.index" @click="toDet(item)">
        <van-cell :title="item.name" is-link />
      </van-cell-group>
    </div>
  </div>
</template>
<script>
export default {
  name: "CommonPro",
  data() {
    return {
      proList: [
        { name: "1. 纠纷调解服务介绍" },
        { name: "2. 纠纷调解服务有哪些类型" },
        { name: "3. 如何申请调解" },
        { name: "4. 如何查看调解结果" },
        { name: "5. 为什么要进行实名认证" }
      ]
    };
  },
  created() {
    this.requestPostCommonPro();
  },
  methods: {
    back() {
      this.$router.isBack = true; // 将返回状态置为触发态，以边路由监听触发返回动画
      this.$router.back(); // 路由向后退一步
    },

    toDet(msg) {
      this.$router.push({
        path: "/contradictionDet",
        query: {
          detData: msg
        }
      });
    },

    requestPostCommonPro() {
      this.post("sumQuestion/load", {})
        .then(res => {
          console.log("commonPro", res);
          if (res.array.length) {
            this.proList = res.array;
          }
        })
        .catch(err => {});
    }
  }
};
</script>
<style lang="scss" scoped>
@import "~@/smobile.scss";
.CommonPro {
  .header {
    padding: $sm-spaceing-block-sm 0 $sm-spaceing-block-sm 0;

    position: absolute;
    width: $sm-img-per-max;
    height: 21px;
    background: $sm-bg-color;
    z-index: 2;

    display: flex;
    flex-direction: row nowrap;
    justify-content: flex-start;
    .backIcon {
      position: absolute;
      white-space: nowrap;
      height: $sm-icon-px-md;
      z-index: 4;

      .iconImage {
        height: $sm-icon-px-md;
        width: $sm-icon-px-md;
        transform: rotateY(180deg);
      }
    }

    .theme {
      position: absolute;
      font-weight: bold;
      width: $sm-img-per-max;
      text-align: center;
      white-space: nowrap;
      z-index: 3;
    }
  }

  .outermostMargin {
    background: $sm-bg-color-grey;
    color: $sm-text-color;
    font-size: $sm-font-size-lg;

    overflow: auto;
    height: 100vh;
    // margin: 41px 0 0 0;
  }
}
</style>